home *** CD-ROM | disk | FTP | other *** search
- 'Demo of BASWIND2 modules and BWTOOLS
-
- key off:color 7,1:cls
- dim scrn%(6000)
- 'Put up opening screen
- '4 windows of different colors and a Title Window
-
- call makewind(5,15,13,45,4,4,3,0,1,"")
- call makewind(4,36,15,75,3,15,2,0,1,"")
- call makewind(10,10,21,50,2,0,5,0,1,"")
- call makewind(13,42,22,78,1,3,12,0,1,"")
-
- call makewind(9,20,14,60,2,0,7,0,1,"")
-
- color 0,7:locate 11,35:print"Presenting...";
- seconds=4:gosub waitsec
-
- call makewind(9,20,14,60,0,0,7,0,0,"")
- call makewind(9,20,14,60,2,0,7,1,0,"")
- locate 10,33:print "B A S W I N D 2"
- locate 12,28:print"Windowing Routines for the"
- locate 13,26:print"Microsoft QuickBASIC Compiler"
-
- seconds=3:gosub waitsec
-
- call makewind(15,55,19,75,1,0,6,0,1,"")
- color 0,6
- locate 15,65:print "By"
- locate 17,61:print "Dave Evers"
- locate 18,57:print "2500 Larch Rd. #58"
- locate 19,57:print "Quincy, IL 62301"
-
- seconds=4:gosub waitsec
-
- call makewind(8,25,15,55,2,7,1,1,0,"")
-
- color 15,1
- locate 8,35:print "Including ..."
- locate 10,30:print "*** Window Tools ***"
- locate 12,28:print "A collection of routines"
- locate 13,28:print "for integration into your"
- locate 14,28:print "own programs.
-
- seconds=4:gosub waitsec
-
- call makewind(8,25,15,55,2,7,1,0,0,"")
-
- locate 8,25:print " * * * * * * * * * * * * * "
- locate 10,28:print "Stand by for a guided tour"
- locate 12,28:print "through the many facets of"
- locate 14,28:print "this exciting program."
-
- seconds=3:gosub waitsec
-
- cls
-
- call makewind(9,15,16,65,2,0,7,0,1,"")
-
- color 0,7
-
- locate 10,18:print "The basic purpose of BASWIND2 is to provide"
- locate 11,18:print "the fundamental routines for implementing"
- locate 12,18:print "simple 'windowing' into your QuickBASIC pro-"
- locate 13,18:print "grams. With just a few simple statements,"
- locate 14,18:print "you can 'pop-up' a colored window onto the"
- locate 15,18:print "screen; just like this ..."
-
- seconds=3:gosub waitsec
-
- call makewind(3,50,8,79,1,15,4,0,0,"")
-
- seconds=3:gosub waitsec
-
- call makewind(9,15,16,65,2,0,7,0,0,"")
-
- locate 12,18:print"The window can be a solid panel of any of
- locate 14,18:print"the BASIC background colors; such as ..."
-
- seconds=4:gosub waitsec
-
- call makewind(2,3,8,35,0,1,2,0,0,"")
-
- seconds=3:gosub waitsec
-
- call makewind(9,15,16,65,2,0,7,0,0,"")
-
- locate 12,18:print"or it can be surrounded by a 'frame' in any"
- locate 13,18:print"of four styles..."
-
- seconds=3:gosub waitsec
-
- call makewind(5,6,11,37,1,9,5,0,0,"Frame Style 1")
- call makewind(8,9,14,40,2,12,3,0,0,"Frame Style 2")
- call makewind(11,12,17,43,3,15,4,0,0,"Frame Style 3")
- call makewind(14,15,20,46,4,0,6,0,0,"Frame Style 4")
-
- seconds=3:gosub waitsec
-
- color 7,1
- cls
- call makewind(9,15,16,65,2,0,7,0,1,"")
-
- color 0,7
- locate 10,18:print "The frame itself can be in any one of the"
- locate 11,18:print "BASIC foreground colors. It can even blink"
- locate 12,18:print "if you want..."
-
- seconds=3:gosub waitsec
- for i=0 to 15
- clr%=i
- label$="Color:"+str$(i)
-
- call makewind(15,10,23,45,4,clr%,5,0,0,label$)
- seconds=.5:gosub waitsec
- next i
- call makewind(15,10,23,45,4,127,5,0,0,"Color: 127")
-
- seconds=4:gosub waitsec
-
- color 7,1
- cls
-
- call makewind(9,15,16,65,2,0,7,0,1,"")
- color 0,7
- locate 14,18:print "The window itself can be presented in many"
- locate 15,18:print "different ways. It can be flat..."
-
- seconds=3:gosub waitsec
-
- call makewind(2,2,11,32,1,15,4,0,0,"")
-
- seconds=3:gosub waitsec
-
- call makewind(9,15,16,65,2,0,7,0,0,"")
- locate 14,17:print "or it can have a black shadow underneath; giving"
- locate 15,17:print "a three-dimensional effect..."
- seconds=3:gosub waitsec
- call makewind(2,35,11,55,2,15,5,0,1,"")
-
- seconds=3:gosub waitsec
-
- color 7,1
- cls
- color 0,7
-
- call makewind(9,15,16,65,2,0,7,0,1,"")
- locate 12,18:print "For a particularly dramatic effect, the window"
- locate 13,18:print "can 'grow' onto the screen..."
-
- seconds=3:gosub waitsec
- call makewind(8,10,17,70,2,15,4,1,0,"")
- color 15,4
- locate 12,37:print "W O W !!!
- seconds=3:gosub waitsec
-
- color 0,7
- call makewind(9,15,16,65,2,0,7,0,1,"")
- locate 10,18:print "Once you have your window on the screen, simply"
- locate 11,18:print "use LOCATE, COLOR, and PRINT statements to put"
- locate 12,18:print "text in them. Another call with the same param-"
- locate 13,18:print "eters as the first ...
- seconds=3:gosub waitsec
- call makewind(9,15,16,65,2,0,7,0,0,"")
- locate 10,18:print "will erase the window for new text. But suppose"
- locate 11,18:print "that instead of clearing the window, you would"
- locate 12,18:print "rather SCROLL the data inside either up or down,"
- locate 13,18:print "and put a new line of text on either the top or"
- locate 14,18:print "bottom line; as the case might be..."
- seconds=3:gosub waitsec
-
- call scroll(9,15,16,65,1,1," NEVER FEAR . . . ")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,1,"")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,1," The SCROLL routine will do just that! You can")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,1," scroll lines of text - ")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,1," UP")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,1," UP")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,1," UP")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,-1,"")
- seconds =1:gosub waitsec
- call scroll(9,15,16,65,1,-1,"")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,-1,"")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,-1," or DOWN")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,-1," DOWN")
- seconds=1:gosub waitsec
- call scroll(9,15,16,65,1,-1," DOWN")
- seconds=1:gosub waitsec
- call makewind(9,15,16,65,2,0,7,1,0,"")
- locate 10,18:print "just as easily as you can create the window!"
- locate 11,18:print "In fact, all of the commands of BASWIND2 are"
- locate 12,18:print "very easy to use. Here is a call to create"
- locate 13,18:print "this window ..."
- locate 15,18:print " CALL MAKEWIND(9,15,16,65,2,0,7,0,1,'')"
- seconds=4:gosub waitsec
- call makewind(9,15,16,65,2,0,7,0,0,"")
- locate 11,18:print "And this is the call used to perform the SCROLL"
- locate 12,18:print "operation ..."
- locate 14,18:print " CALL SCROLL(9,15,16,65,1,1,'')
- seconds=3:gosub waitsec
- here: clear
- call makewind(9,15,16,65,2,0,7,0,0,"")
- locate 10,18:print "An even simpler command allows you to save the"
- locate 11,18:print "contents of the screen into an integer array;"
- locate 12,18:print "so that you can place a window on the screen"
- locate 13,18:print "and then quickly remove it; leaving the under-"
- locate 14,18:print "lying information as it was. Here is a good"
- locate 15,18:print "example . . ."
- where%=varptr(scrn%(0))
- call savescrn(1,where%)
- seconds=3:gosub waitsec
- call makewind(4,4,13,42,4,0,2,0,1,"")
- locate 9,10:color 0,2:print "This is the first level ..."
- seconds=2:gosub waitsec
- where%=varptr(scrn%(2000))
- call savescrn(1,where%)
- call makewind(7,30,18,79,4,15,4,0,1,"")
- locate 12,40:color 15,4:print "This is the second level ..."
- seconds=2:gosub waitsec
- where%=varptr(scrn%(4000))
- call savescrn(1,where%)
- call makewind(10,25,22,55,4,12,3,0,1,"")
- locate 16,27:color 12,0:print "This is the third level ..."
- seconds=2:gosub waitsec
- locate 16,27:print "Now to go back ... "
- seconds=2:gosub waitsec
- where%=varptr(scrn%(4000))
- call restscrn(1,where%)
- seconds=1:gosub waitsec
- where%=varptr(scrn%(2000))
- call restscrn(1,where%)
- seconds=1:gosub waitsec
- where%=varptr(scrn%(0))
- call restscrn(1,where%)
- seconds=1:gosub waitsec
- call makewind(9,15,16,65,2,0,7,0,0,"")
- locate 9,18:color 0,7:print "The basic routines in the BASWIND2 package"
- locate 10,18: print "give you all you need to create some power-"
- locate 11,18: print "ful 'toolbox' modules to integrate into your"
- locate 12,18: print "programs. But if you would rather not do all"
- locate 13,18: print "the work yourselves, please see the accomp- "
- locate 14,18: print "anying demo program DEMO2.EXE ... "
- seconds=5:gosub waitsec
-
- end
-
- waitsec: begintime=timer
- while endtime < begintime+seconds
- endtime=timer
- wend
- return
-